import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';

class EvaluateController extends GetxController {
  String content = '';
  final item = {}.obs;

  @override
  void onInit() {
    item.value = Get.arguments;
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  toAdd() {
    if (content.isEmpty) {
      EasyLoading.showToast('评价内容不能为空');
      return;
    }
    EasyLoading.show();
    Future.delayed(Duration(seconds: 2), () {
      EasyLoading.dismiss();
      EasyLoading.showToast('评价提交成功，请等待审核');
    });
  }

  @override
  void onClose() {}
}
